import request from '@/utils/http'
import { BaseResult } from '@/types/axios'

export class TagService {
  // 新增标签分类
  static typeCreate(params: object) {
    return request.post<BaseResult>({
      url: '/customer/tag_type/create',
      data: params
    })
  }
  // 更新标签分类
  static typeUpdate(params: object) {
    return request.post<BaseResult>({
      url: '/customer/tag_type/update',
      data: params
    })
  }
  // 删除标签分类
  static typeDelete(params: object) {
    return request.post<BaseResult>({
      url: '/customer/tag_type/delete',
      data: params
    })
  }

  //标签分类列表
  static getTypeList(params?: object) {
    return request.get<BaseResult>({
      url: '/customer/tag_type/list',
      params
    })
  }

  //标签列表
  static getTagList(params: object) {
    return request.get<BaseResult>({
      url: '/customer/tag/list',
      params
    })
  }
  // 新增标签
  static tagCreate(params: object) {
    return request.post<BaseResult>({
      url: '/customer/tag/create',
      data: params
    })
  }
  // 更新标签
  static tagUpdate(params: object) {
    return request.post<BaseResult>({
      url: '/customer/tag/update',
      data: params
    })
  }
  // 删除标签
  static tagDelete(params: object) {
    return request.post<BaseResult>({
      url: '/customer/tag/delete',
      data: params
    })
  }
}